package com.hmall.api.client;

import com.hmall.api.config.DefaultFeigenConfig;
import com.hmall.api.dto.OrderFormDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * ClassName: tradeClient
 * Package:
 * Description
 *
 * @Author xw
 * @Create 2023/12/10 17:06
 */
@FeignClient(value = "trade-service", configuration = DefaultFeigenConfig.class)
public interface TradeClient {

    @PutMapping("/orders/{orderId}")
    void markOrderPaySuccess(@PathVariable("orderId") Long orderId);

    @PostMapping("/orders")
    Long createOrder(@RequestBody OrderFormDTO orderFormDTO);
}
